<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>lwIP: HTTP server</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">lwIP
   &#160;<span id="projectnumber">2.1.2</span>
   </div>
   <div id="projectbrief">Lightweight IP stack</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__httpd.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">Modules</a> &#124;
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">HTTP server<div class="ingroups"><a class="el" href="group__apps.html">Applications</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:group__httpd__opts"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpd__opts.html">Options</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structt_c_g_i.html">tCGI</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gafe011a487c5e8d03a6b2f629e14e6b5c"><td class="memItemLeft" align="right" valign="top">typedef const char *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpd.html#gafe011a487c5e8d03a6b2f629e14e6b5c">tCGIHandler</a>) (int iIndex, int iNumParams, char *pcParam[], char *pcValue[])</td></tr>
<tr class="separator:gafe011a487c5e8d03a6b2f629e14e6b5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf88dacc4f18d299084cab75252001319"><td class="memItemLeft" align="right" valign="top">typedef u16_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpd.html#gaf88dacc4f18d299084cab75252001319">tSSIHandler</a>) (const char *ssi_tag_name, char *pcInsert, int iInsertLen)</td></tr>
<tr class="separator:gaf88dacc4f18d299084cab75252001319"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaca4357acf5c988b28123bc6f23540380"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpd.html#gaca4357acf5c988b28123bc6f23540380">httpd_post_data_recved</a> (void *connection, u16_t recved_len)</td></tr>
<tr class="separator:gaca4357acf5c988b28123bc6f23540380"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac364305cee969a0be43c071722b136e6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpd.html#gac364305cee969a0be43c071722b136e6">httpd_init</a> (void)</td></tr>
<tr class="separator:gac364305cee969a0be43c071722b136e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafaedb1911a83854b1e9835132db64409"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpd.html#gafaedb1911a83854b1e9835132db64409">httpd_inits</a> (struct altcp_tls_config *conf)</td></tr>
<tr class="separator:gafaedb1911a83854b1e9835132db64409"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8834ecb16d9a7d6c128bdf9514b7879c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpd.html#ga8834ecb16d9a7d6c128bdf9514b7879c">http_set_ssi_handler</a> (<a class="el" href="group__httpd.html#gaf88dacc4f18d299084cab75252001319">tSSIHandler</a> ssi_handler, const char **tags, int num_tags)</td></tr>
<tr class="separator:ga8834ecb16d9a7d6c128bdf9514b7879c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae1ec09532ff7fc622e1860727bf2c897"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpd.html#gae1ec09532ff7fc622e1860727bf2c897">http_set_cgi_handlers</a> (const <a class="el" href="structt_c_g_i.html">tCGI</a> *cgis, int num_handlers)</td></tr>
<tr class="separator:gae1ec09532ff7fc622e1860727bf2c897"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6cb33693ee8f0c054be82a968ceff582"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpd.html#ga6cb33693ee8f0c054be82a968ceff582">httpd_post_begin</a> (void *connection, const char *uri, const char *http_request, u16_t http_request_len, int content_len, char *response_uri, u16_t response_uri_len, u8_t *post_auto_wnd)</td></tr>
<tr class="separator:ga6cb33693ee8f0c054be82a968ceff582"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga461409c8813c2a82ba63fde987c0e537"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpd.html#ga461409c8813c2a82ba63fde987c0e537">httpd_post_receive_data</a> (void *connection, struct <a class="el" href="structpbuf.html">pbuf</a> *p)</td></tr>
<tr class="separator:ga461409c8813c2a82ba63fde987c0e537"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga477473f7ead250fec71f1f8b9926fec5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__httpd.html#ga477473f7ead250fec71f1f8b9926fec5">httpd_post_finished</a> (void *connection, char *response_uri, u16_t response_uri_len)</td></tr>
<tr class="separator:ga477473f7ead250fec71f1f8b9926fec5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This httpd supports for a rudimentary server-side-include facility which will replace tags of the form in any file whose extension is .shtml, .shtm or .ssi with strings provided by an include handler whose pointer is provided to the module via function <a class="el" href="group__httpd.html#ga8834ecb16d9a7d6c128bdf9514b7879c">http_set_ssi_handler()</a>. Additionally, a simple common gateway interface (CGI) handling mechanism has been added to allow clients to hook functions to particular request URIs.</p>
<p>To enable SSI support, define label LWIP_HTTPD_SSI in lwipopts.h. To enable CGI support, define label LWIP_HTTPD_CGI in lwipopts.h.</p>
<p>By default, the server assumes that HTTP headers are already present in each file stored in the file system. By defining LWIP_HTTPD_DYNAMIC_HEADERS in lwipopts.h, this behavior can be changed such that the server inserts the headers automatically based on the extension of the file being served. If this mode is used, be careful to ensure that the file system image used does not already contain the header information.</p>
<p>File system images without headers can be created using the makefsfile tool with the -h command line option.</p>
<h2>Notes about valid SSI tags </h2>
<p>The following assumptions are made about tags used in SSI markers:</p>
<ol type="1">
<li>No tag may contain '-' or whitespace characters within the tag name.</li>
<li>Whitespace is allowed between the tag leadin "&lt;!--#" and the start of the tag name and between the tag name and the leadout string "--&gt;".</li>
<li>The maximum tag name length is LWIP_HTTPD_MAX_TAG_NAME_LEN, currently 8 characters.</li>
</ol>
<h2>Notes on CGI usage </h2>
<p>The simple CGI support offered here works with GET method requests only and can handle up to 16 parameters encoded into the URI. The handler function may not write directly to the HTTP output but must return a filename that the HTTP server will send to the browser as a response to the incoming CGI request.</p>
<p>The list of supported file types is quite short, so if makefsdata complains about an unknown extension, make sure to add it (and its doctype) to the 'g_psHTTPHeaders' list. </p>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="gafe011a487c5e8d03a6b2f629e14e6b5c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafe011a487c5e8d03a6b2f629e14e6b5c">&#9670;&nbsp;</a></span>tCGIHandler</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef const char*(* tCGIHandler) (int iIndex, int iNumParams, char *pcParam[], char *pcValue[])</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function pointer for a CGI script handler.</p>
<p>This function is called each time the HTTPD server is asked for a file whose name was previously registered as a CGI function using a call to http_set_cgi_handlers. The iIndex parameter provides the index of the CGI within the cgis array passed to http_set_cgi_handlers. Parameters pcParam and pcValue provide access to the parameters provided along with the URI. iNumParams provides a count of the entries in the pcParam and pcValue arrays. Each entry in the pcParam array contains the name of a parameter with the corresponding entry in the pcValue array containing the value for that parameter. Note that pcParam may contain multiple elements with the same name if, for example, a multi-selection list control is used in the form generating the data.</p>
<p>The function should return a pointer to a character string which is the path and filename of the response that is to be sent to the connected browser, for example "/thanks.htm" or "/response/error.ssi".</p>
<p>The maximum number of parameters that will be passed to this function via iNumParams is defined by LWIP_HTTPD_MAX_CGI_PARAMETERS. Any parameters in the incoming HTTP request above this number will be discarded.</p>
<p>Requests intended for use by this CGI mechanism must be sent using the GET method (which encodes all parameters within the URI rather than in a block later in the request). Attempts to use the POST method will result in the request being ignored. </p>

</div>
</div>
<a id="gaf88dacc4f18d299084cab75252001319"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf88dacc4f18d299084cab75252001319">&#9670;&nbsp;</a></span>tSSIHandler</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef u16_t(* tSSIHandler) (const char *ssi_tag_name, char *pcInsert, int iInsertLen)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function pointer for the SSI tag handler callback.</p>
<p>This function will be called each time the HTTPD server detects a tag of the form in files with extensions mentioned in the g_pcSSIExtensions array (currently .shtml, .shtm, .ssi, .xml, .json) where "name" appears as one of the tags supplied to http_set_ssi_handler in the tags array. The returned insert string, which will be appended after the the string "&lt;!--#name--&gt;" in file sent back to the client, should be written to pointer pcInsert. iInsertLen contains the size of the buffer pointed to by pcInsert. The iIndex parameter provides the zero-based index of the tag as found in the tags array and identifies the tag that is to be processed.</p>
<p>The handler returns the number of characters written to pcInsert excluding any terminating NULL or HTTPD_SSI_TAG_UNKNOWN when tag is not recognized.</p>
<p>Note that the behavior of this SSI mechanism is somewhat different from the "normal" SSI processing as found in, for example, the Apache web server. In this case, the inserted text is appended following the SSI tag rather than replacing the tag entirely. This allows for an implementation that does not require significant additional buffering of output data yet which will still offer usable SSI functionality. One downside to this approach is when attempting to use SSI within JavaScript. The SSI tag is structured to resemble an HTML comment but this syntax does not constitute a comment within JavaScript and, hence, leaving the tag in place will result in problems in these cases. In order to avoid these problems, define LWIP_HTTPD_SSI_INCLUDE_TAG as zero in your lwip options file, or use JavaScript style block comments in the form / * # name * / (without the spaces). </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gae1ec09532ff7fc622e1860727bf2c897"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae1ec09532ff7fc622e1860727bf2c897">&#9670;&nbsp;</a></span>http_set_cgi_handlers()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void http_set_cgi_handlers </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structt_c_g_i.html">tCGI</a> *&#160;</td>
          <td class="paramname"><em>cgis</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num_handlers</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set an array of CGI filenames/handler functions</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cgis</td><td>an array of CGI filenames/handler functions </td></tr>
    <tr><td class="paramname">num_handlers</td><td>number of elements in the 'cgis' array </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8834ecb16d9a7d6c128bdf9514b7879c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8834ecb16d9a7d6c128bdf9514b7879c">&#9670;&nbsp;</a></span>http_set_ssi_handler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void http_set_ssi_handler </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__httpd.html#gaf88dacc4f18d299084cab75252001319">tSSIHandler</a>&#160;</td>
          <td class="paramname"><em>ssi_handler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char **&#160;</td>
          <td class="paramname"><em>tags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num_tags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the SSI handler function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ssi_handler</td><td>the SSI handler function </td></tr>
    <tr><td class="paramname">tags</td><td>an array of SSI tag strings to search for in SSI-enabled files </td></tr>
    <tr><td class="paramname">num_tags</td><td>number of tags in the 'tags' array </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gac364305cee969a0be43c071722b136e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac364305cee969a0be43c071722b136e6">&#9670;&nbsp;</a></span>httpd_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void httpd_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initialize the httpd: set up a listening PCB and bind it to the defined port </p>

</div>
</div>
<a id="gafaedb1911a83854b1e9835132db64409"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafaedb1911a83854b1e9835132db64409">&#9670;&nbsp;</a></span>httpd_inits()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void httpd_inits </td>
          <td>(</td>
          <td class="paramtype">struct altcp_tls_config *&#160;</td>
          <td class="paramname"><em>conf</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initialize the httpd: set up a listening PCB and bind it to the defined port. Also set up TLS connection handling (HTTPS). </p>

</div>
</div>
<a id="ga6cb33693ee8f0c054be82a968ceff582"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6cb33693ee8f0c054be82a968ceff582">&#9670;&nbsp;</a></span>httpd_post_begin()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> httpd_post_begin </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>connection</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>uri</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>http_request</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16_t&#160;</td>
          <td class="paramname"><em>http_request_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>content_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>response_uri</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16_t&#160;</td>
          <td class="paramname"><em>response_uri_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8_t *&#160;</td>
          <td class="paramname"><em>post_auto_wnd</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Called when a POST request has been received. The application can decide whether to accept it or not.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connection</td><td>Unique connection identifier, valid until httpd_post_end is called. </td></tr>
    <tr><td class="paramname">uri</td><td>The HTTP header URI receiving the POST request. </td></tr>
    <tr><td class="paramname">http_request</td><td>The raw HTTP request (the first packet, normally). </td></tr>
    <tr><td class="paramname">http_request_len</td><td>Size of 'http_request'. </td></tr>
    <tr><td class="paramname">content_len</td><td>Content-Length from HTTP header. </td></tr>
    <tr><td class="paramname">response_uri</td><td>Filename of response file, to be filled when denying the request </td></tr>
    <tr><td class="paramname">response_uri_len</td><td>Size of the 'response_uri' buffer. </td></tr>
    <tr><td class="paramname">post_auto_wnd</td><td>Set this to 0 to let the callback code handle window updates by calling 'httpd_post_data_recved' (to throttle rx speed) default is 1 (httpd handles window updates automatically) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK: Accept the POST request, data may be passed in another err_t: Deny the POST request, send back 'bad request'. </dd></dl>

</div>
</div>
<a id="gaca4357acf5c988b28123bc6f23540380"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaca4357acf5c988b28123bc6f23540380">&#9670;&nbsp;</a></span>httpd_post_data_recved()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void httpd_post_data_recved </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>connection</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16_t&#160;</td>
          <td class="paramname"><em>recved_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>A POST implementation can call this function to update the TCP window. This can be used to throttle data reception (e.g. when received data is programmed to flash and data is received faster than programmed).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connection</td><td>A connection handle passed to httpd_post_begin for which httpd_post_finished has <em>NOT</em> been called yet! </td></tr>
    <tr><td class="paramname">recved_len</td><td>Length of data received (for window update) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga477473f7ead250fec71f1f8b9926fec5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga477473f7ead250fec71f1f8b9926fec5">&#9670;&nbsp;</a></span>httpd_post_finished()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void httpd_post_finished </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>connection</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>response_uri</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16_t&#160;</td>
          <td class="paramname"><em>response_uri_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Called when all data is received or when the connection is closed. The application must return the filename/URI of a file to send in response to this POST request. If the response_uri buffer is untouched, a 404 response is returned.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connection</td><td>Unique connection identifier. </td></tr>
    <tr><td class="paramname">response_uri</td><td>Filename of response file, to be filled when denying the request </td></tr>
    <tr><td class="paramname">response_uri_len</td><td>Size of the 'response_uri' buffer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga461409c8813c2a82ba63fde987c0e537"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga461409c8813c2a82ba63fde987c0e537">&#9670;&nbsp;</a></span>httpd_post_receive_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> httpd_post_receive_data </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>connection</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structpbuf.html">pbuf</a> *&#160;</td>
          <td class="paramname"><em>p</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Called for each pbuf of data that has been received for a POST. ATTENTION: The application is responsible for freeing the pbufs passed in!</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connection</td><td>Unique connection identifier. </td></tr>
    <tr><td class="paramname">p</td><td>Received data. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK: Data accepted. another err_t: Data denied, http_post_get_response_uri will be called. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
